package com.sky.financelake.adapter;

import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Handler;
import android.os.Message;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.sky.financelake.R;
import com.sky.financelake.bean.DataParse;
import com.sky.financelake.bean.KLineBean;
import com.sky.financelake.bean.dto.SimpleDayKDto;
import com.sky.mpchartlib.charts.BarChart;
import com.sky.mpchartlib.charts.CombinedChart;
import com.sky.mpchartlib.components.XAxis;
import com.sky.mpchartlib.components.YAxis;
import com.sky.mpchartlib.data.BarDataSet;
import com.sky.mpchartlib.listener.BarLineChartTouchListener;
import com.sky.mpchartlib.listener.CoupleChartGestureListener;

import java.util.ArrayList;
import java.util.List;

/**
 * CreateTime: 2020/1/15 15:06
 * Author: hxd
 * Content:
 * UpdateTime:
 * UpdateName;
 * UpdateContent:
 */
public class HorizontalVpAdapter extends RecyclerView.Adapter<HorizontalVpAdapter.HorizontalVpViewHolder> {

    private List<SimpleDayKDto> simpleDayKDtos;
    private Context mContext;

    HorizontalVpAdapter(Context context, List<SimpleDayKDto> simpleDayKDtos) {
        this.mContext = context;
        this.simpleDayKDtos = simpleDayKDtos;
    }

    @NonNull
    @Override
    public HorizontalVpViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        return new HorizontalVpViewHolder(LayoutInflater.from(mContext).inflate((R.layout.item_dayk), parent, false));
    }

    @SuppressLint("SetTextI18n")
    @Override
    public void onBindViewHolder(@NonNull HorizontalVpViewHolder holder, int position) {
    }

    @Override
    public int getItemCount() {
        return simpleDayKDtos.size();
    }

    class HorizontalVpViewHolder extends RecyclerView.ViewHolder {
        CombinedChart combinedChart;
        BarChart barChart;

        HorizontalVpViewHolder(@NonNull View itemView) {
            super(itemView);
            combinedChart = itemView.findViewById(R.id.combined_chart);
            barChart = itemView.findViewById(R.id.bar_chart);
        }
    }


}

